
// Copyright (c) Iuri Apollonio 1998
// Use & modify as you want & need, and leave those 4 lines.
// Strongly based on article "Inplace edit control" of Mario Contestabile and "Editable subitems" of Zafir
// http://www.codeguru.com

#ifndef __WTL_GFX_GROUP_EDIT_H__
#define __WTL_GFX_GROUP_EDIT_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// GfxGroupEdit.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CGfxGroupEdit window

class CGfxGroupEdit : public CWindowImpl<CGfxGroupEdit, CEdit>
{
public:
	CGfxGroupEdit();

public:
	BOOL	bEscapeKey;
	CString text;
	WPARAM	msgSend;
	bool	bNoDown;

public:
	virtual void OnFinalMessage (HWND hWnd) override;

public:
	int iFolderIndex, iItemIndex;
	virtual ~CGfxGroupEdit();

	// Generated message map functions
protected:
    BEGIN_MSG_MAP_EX (CGfxGroupEdit)
        MSG_WM_KILLFOCUS (OnKillFocus)
        MSG_WM_CREATE (OnCreate)
        MSG_WM_CHAR (OnChar)
        MESSAGE_HANDLER (MWM_PRE_FILTER_INPUT_MSG, OnPreFilterInputMessage)
    END_MSG_MAP_EX ()

	void OnKillFocus (CWindow wndFocus);
    int OnCreate (LPCREATESTRUCT lpCreateStruct);
	void OnChar(TCHAR chChar, UINT nRepCnt, UINT nFlags);
    LRESULT OnPreFilterInputMessage (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};

#endif
